﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="spread_list.aspx.cs" Inherits="Spread_spread_list" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>推广业绩</title>
    <script type="text/javascript" src="../js/jquery1.6.2.js"></script>
    <script type="text/javascript" src="../backmanage/external/jquery.bgiframe-2.1.2.js"></script>
	<script type="text/javascript" src="../js/jquery.ui.core.js"></script> 
	<script type="text/javascript" src="../js/jquery.ui.widget.js"></script> 
	<script type="text/javascript" src="../js/jquery.ui.mouse.js"></script> 
	<script type="text/javascript" src="../js/jquery.ui.button.js"></script> 
	<script type="text/javascript" src="../js/jquery.ui.draggable.js"></script> 
	<script type="text/javascript" src="../js/jquery.ui.position.js"></script> 
	<script type="text/javascript" src="../js/jquery.ui.resizable.js"></script> 
	<script type="text/javascript" src="../js/jquery.ui.dialog.js"></script>
	<script type="text/javascript" src="../js/datepicker.get.js"></script>
	<script type="text/javascript" src="../js/jquery.effects.core.js"></script>
    <link rel="stylesheet" href="../css/demos.css" />
    <link rel="stylesheet" href="../css/jquery.ui.all.css" />
    <script type="text/javascript">
      $(function(){
      $("#dialog-form").dialog("destory"); 
         $.ajax({
              anysc:false,
              url:'API/A_Spreadlogon.aspx',
              type:'POST',
              data:{edit:'listbyyear'},
              success:function(msg)
              {
                $("#list tbody").replaceWith(msg);
              }
         })
         $("#datetime").datepicker({
               showOn:'button',
               buttonImage:'../Image/calendar.gif',
               buttonImageOnly:true,
               disabled:true,
               changeYear:false,
               changeMonth:false,
               dateFormat:'yy-mm-dd',
               monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
               dayNamesMin:["日","一","二","三","四","五","六"],
               altYearField:"#alty",
               altMonthField:'#altm',
               altDayField:'#altd',
               altYearFormat:'yy',
               altMonthFormat:'mm',
               altDayFormat:'dd',   
         });
         $("#dialog-form").dialog({
                        autoOpen:false,
                        height:370,
                        width:450,
                        modal:true,
                        buttons:{"确认":function(){$(this).dialog("close");}},
                        close:function(){$(this).dialog("close");},
               });
         function ListByMonth(y,m,d)
         {
           $.ajax({
                  anysc:false,
                  url:'API/A_Spreadlogon.aspx',
                  type:'POST',
                  data:{edit:'listbymonth',y:y,m:m,d:d},
                  success:function(msg)
                  {
                    $("#monthlist tbody").text("");
                    $("#monthlist tbody").replaceWith(msg);
                  }
           })
         }
         function SetTitle(y,m)
         {
           $(".validateTips").text(y+"年"+m+"月推广业绩详情");
           ListByMonth(y,m,'0');
         }
         function SelectListByTime()
         {
           ListByMonth($("#alty").val(),$("#altm").val(),$("#altd").val());
           
         }
         function aaa(e)
         {
           $("#dialog-form").dialog("open");SetTitle($(e).parent().parent().eq(3).text(),$(e).parent().parent().eq(4).text());
         }
         $(".link").button().click(function(){$("#dialog-form").dialog("open");SetTitle($(this).parent().parent().eq(3).text(),$(this).parent().parent().eq(4).text());});

         $("#select").click(function(){SelectListByTime();})
      })
    </script>
    <style type="text/css">
        body { font-size: 62.5%; }
		label, input { display:block;}
		input.text { margin-bottom:12px; width:95%; padding: .4em; }
		fieldset { padding:0; border:0; margin-top:25px; }
		h1 { font-size: 1.2em; margin: .6em 0; }
		div#users-contain { width: 350px; margin: 20px 0; }
		div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
		div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
		.ui-dialog .ui-state-error { padding: .3em; }
    	.validateTips { border:1px transparent solid; padding: 0.3em; }
		.validateTips input{border:1}
		.text{border:1}
		div#img-size{ width:200px}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <table id="list">
         <thead>
           <tr>
             <td>编号</td>
             <td>注册人数</td>
             <td>新手卡发放量</td>
             <td>年</td>
             <td>月</td>
             <td>操作</td>
           </tr>
         </thead>
         <tbody>
         </tbody>
         <tfoot>
           <tr>
             <td colspan="6">一共100页，第一页</td>
           </tr>
         </tfoot>
       </table>
       <script type="text/javascript">
       $(function(){
       })
       </script>
    </div>
    <div id="dialog-form" title="详细信息">
    <p class="validateTips">详细信息</p> 
    <fieldset>
      <input type="text" id="datetime" style="display:none"/><input type="text" id="alty" /><input type="text" id="altm" /><input type="text" id="altd" /><input type="button" id="select" value="查询" />
       <table id="monthlist">
         <thead>
           <tr>
             <td>推广员名称</td>
             <td>地区</td>
             <td>年</td>
             <td>月</td>
             <td>日</td>
             <td>时间</td>
             <td>类型</td>
           </tr>
         </thead>
         <tbody>
         
         </tbody>
         <tfoot>
            <tr>
              <td colspan="7"></td>
            </tr>
         </tfoot>
       </table>
    </fieldset>
    </div>
    </form>
</body>
</html>
